package org.java.runtime;

import sun.java2d.loops.ProcessPath;

import java.io.IOException;

/**
 * @author Zhang Guangyong
 * @desacription 运行时类测试
 * @date 2019年07月19日 14:08
 */
public class Main {

    public static void main(String[] args) throws IOException {

        Runtime runtime = Runtime.getRuntime();

        System.out.println("处理器数量:"+ runtime.availableProcessors());
        System.out.println("空闲内存数:"+ runtime.freeMemory());
        System.out.println("总内存:"+ runtime.totalMemory());
        System.out.println("可用最大内存:"+ runtime.maxMemory());


        //启动记事本
        Process process = runtime.exec("notepad.exe");




    }
}
